package oj;

public class Day24F {
    public int getMost(int[][] board) {
        int n=board.length;
        for (int i = 1; i < n; i++) {
            board[i][0]+=board[i-1][0];
        }
        for (int i = 1; i < n; i++) {
            board[0][i]+=board[0][i-1];
        }
        for (int i = 1; i < n; i++) {
            for (int j = 1; j < n; j++) {
                board[i][j]+=Math.max(board[i-1][j],board[i][j-1]);
            }
        }
        return board[n-1][n-1];
    }
}
